//这个模块主要获取题库管理的数据信息
import request from '@/utils/request'
//获取题库列表接口
///question/personal-question-store/getAllPersonalQuestionStore
export const reqStoreList = ()=>request({
    url:'question/personal-question-store/getAllPersonalQuestionStore',
    method:'get',
});

//添加题库huo修改题库
//createPersonalQuestionStore
export const reqAddOrUpdateStore = (questionStore)=>{
    //通过id判断是添加还是修改
    if(questionStore.id){
        return request({
            url:'question/personal-question-store/updatePersonalQuestionStore',
            method:'post',
            data:questionStore,
        });
    }else{
        return request({
            url:'question/personal-question-store/createPersonalQuestionStore',
            method:'post',
            data:questionStore,
        });
    }
};
//删除题库
//deletePersonalQuestionStore/{personalQuestionStoreId}
export const reqDeleteStore = (id)=>request({
    url:`question/personal-question-store/deletePersonalQuestionStore/${id}`,
    method:'post',
});

//查询老师特定题库的各种题型数量
//getPersonalQuestionStoreTypeNumber/{personalQuestionStoreId}
export const reqGetStoreTypeNumber = (id)=>request({
    url:`question/personal-question-store/getPersonalQuestionStoreTypeNumber/${id}`,
    method:'get',
});

//查询某题库中已删除
//getPersonalQuestionHasDeleted/{personalQuestionStoreId}
export const reqGetPersonalQuestionHasDeleted = (personalQuestionStoreId)=>request({
    url:`question/personal-question-store/getPersonalQuestionHasDeleted/${personalQuestionStoreId}`,
    method:'get',
});

//恢复已删除试题
//recoveryDeleted
//String[] personalQuestionIds
export const reqRecoveryDeleted = (str)=>request({
    url:'question/personal-question-store/recoveryDeleted',
    method:'post',
    data:str,
});

//彻底删除多个个人试题
//deletePersonalQuestionBysIdComplete
//String[] personalQuestionIds
export const reqDeletePersonalQuestionBysIdComplete = (str)=>request({
    url:'question/personal-question-store/deletePersonalQuestionBysIdComplete',
    method:'post',
    data:str,
});